package com.eps.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Diana
 */
@Embeddable
public class SuministroEmpresaZonalPK implements Serializable {
	private static final long serialVersionUID = 1L;
    @Basic(optional = false)
    @Column(name = "id_suministro")
    private String idSuministro;
    @Basic(optional = false)
    @Column(name = "id_zona")
    private String idZona;

    public SuministroEmpresaZonalPK() {
    }

    public SuministroEmpresaZonalPK(String idSuministro, String idZona) {
        this.idSuministro = idSuministro;
        this.idZona = idZona;
    }

    public String getIdSuministro() {
        return idSuministro;
    }

    public void setIdSuministro(String idSuministro) {
        this.idSuministro = idSuministro;
    }

    public String getIdZona() {
        return idZona;
    }

    public void setIdZona(String idZona) {
        this.idZona = idZona;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idSuministro != null ? idSuministro.hashCode() : 0);
        hash += (idZona != null ? idZona.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SuministroEmpresaZonalPK)) {
            return false;
        }
        SuministroEmpresaZonalPK other = (SuministroEmpresaZonalPK) object;
        if ((this.idSuministro == null && other.idSuministro != null) || (this.idSuministro != null && !this.idSuministro.equals(other.idSuministro))) {
            return false;
        }
        if ((this.idZona == null && other.idZona != null) || (this.idZona != null && !this.idZona.equals(other.idZona))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "suministros.ejb30.entity.SuministroEmpresaZonalPK[idSuministro=" + idSuministro + ", idZona=" + idZona + "]";
    }

}
